// @FileName  :chess.c
// @Time      :2024/3/6 23:17
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>
#include <stdio.h>

int map[50][50];

int solve(int i, int j) {//start
    int x = i, y = j, dx = 1, dy = 1;
    int r = 1, rd = 1, d = 1, ld = 1;
    if (map[i][j] == 0) return 0;

    for (; dx < 4; dx++, dy++) {//x up_down
        if (map[x + dx][y] != map[x][y]) d = 0;
        if (map[x + dx][y + dy] != map[x][y]) rd = 0;
        if (map[x][y + dy] != map[x][y]) r = 0;
        if (map[x + dx][y - dy] != map[x][y]) ld = 0;
    }
    if (map[x + dx][y] != 0 && 0 != map[x - 1][y]) d = 0;
    if (map[x + dx][y + dy] != 0 && 0 != map[x - 1][y - 1]) rd = 0;
    if (map[x][y + dy] != 0 && 0 != map[x][y - 1]) r = 0;
    if (map[x + dx][y - dy] != 0 && 0 != map[x + 1][y - 1]) ld = 0;

    if (r || rd || d || ld) {
        printf("%d:%d,%d", map[i][j], i-14, j-14);
        return 1;
    }
    return 0;
}

void main() {
    memset(map, 0, sizeof map);
    for (int i = 15; i < 34; i++)
        for (int j = 15; j < 34; j++)
            scanf("%d", &map[i][j]);
    for (int i = 15; i < 34; i++)
        for (int j = 15; j < 34; j++)
            if (solve(i, j)) {
                return 0;
            }
    for (int i = 15; i < 34; i++)printf("%d : %d\n", i, map[i][14+8]);
    printf("No");
}
